<template>
	<div id="message_detail">
		<div class="form">
			<div class="row">
				<label class="label">消息标题：</label>
				<span class="span">{{message.title}}</span>
			</div>
			<div class="row">
				<label class="label">消息内容：</label>
				<span class="span" style="white-space: pre-line;">{{message.content}}</span>
			</div>
			<div class="row">
				<label class="label">消息类型：</label>
				<span class="span">{{message.typeName}}</span>
			</div>
			<div class="row">
				<label class="label">接收时间：</label>
				<span class="span ">{{message.publishTime}}</span>
			</div>
			<div class="row">
				<label class="label">发送人：</label>
				<span class="span">{{message.sendName}}</span>
			</div>
		</div>
	</div>
</template>

<script>
var vm,dict;
export default {
	data : function() {
		return {
			message : {},
		}
	},
	methods : {
		init : function(message) {
			vm.message = message;
			api.messageRead({messageLogId: message.logId}).then(function(data) {
				vm.$emit("read");
			})
		},
		cancel : function() {
			vm.$emit("cancel");
		},
	},
	created : function() {
		vm = this;
	}
}
</script>
<style scoped>
	.form {
		font-size: 0.16rem;
		color: #666666;
		line-height: 0.26rem;
		letter-spacing: 0.01rem;
	}
	.row {
		padding: 0.06rem 0;
		overflow: hidden;
		/*outline: 1px solid;*/
	}
	.label {
		display: inline-block;
		width: 0.95rem;
		text-align: right;
		font-weight: bold;
		vertical-align: top;
		/*outline: 1px solid blue;*/
	}
	.span {
		float: right;
		display: inline-block; 
		width: 6.35rem;
	}
</style>